<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>患者复诊</title>
    <!-- 引入样式文件 -->
    <link rel="stylesheet" href="../../common/css/vant-index.css" />
    <link rel="stylesheet" href="../css/monitor.css">

    <!-- 引入 Vue 和 Vant 的 JS 文件 -->
    <script src="../../common/js/vue.min.js"></script>
    
    <script src="../../common/js/axios.min.js"></script><script src="../../base.js"></script>
    <script src="../../common/js/vue.global.prod.js"></script>
    <!-- 引入 viewer 图片预览样式文件 -->
    <link href="../../common/css/viewer.css" rel="stylesheet" />
    <style>
        .container {
            border: 1px solid #f5f5f5;
            box-shadow: -1px 5px 5px #ececec;
            border-radius: 10px;
            margin: 0.6rem;
            padding: 0;
            height: 24rem;
            position: relative;
        }

        .img_tip {
            height: 2rem;
            width: 14rem;
            margin: 2rem auto;
            color: #757575;
            font-size: 1.2rem;
        }

        #showTime {
            margin-right: 0.2rem;

        }

        .time {
            width: 12rem;
            height: 2rem;
            margin: 0 auto;
            color: #757575
        }

        .img {
            height: 20rem;
            width: 20rem;
            margin: 0 auto;
        }
    </style>

</head>

<body>
    <div id="app" v-cloak>
        <van-nav-bar title="患者复诊" left-text="返回" left-arrow @click-left="onClickLeft" @click-right="onClickRight">
            <template #right>
                <van-icon name="wap-home-o" size='18' />
            </template>
        </van-nav-bar>
        <div class="container">
            <div class="img">
                <img :src="ReceptionImg" alt="">
            </div>
            <div class="time">
                <span id="showTime">扫码为本次复诊体验打分</span>
            </div>
        </div>
        <div class="img_tip">

            <span>请向离店患者出示此码</span>

        </div>
    </div>
</body>
<script src="../../common/js/index.umd.js"></script>
<script src="../../common/js/vant.min.js"></script>
<script type="module">

    import {
        getAction,
        postAction,
        getUrl,
    } from "../../common/js/api/vue3-axios-utils.js";

    const app = Vue.createApp({

        data() {
            return {
                url: {
                    getReception: "/flup/patient/qrcode",

                },
                id: '',
                list: [],
                ReceptionImg: '',
            }
        },
        methods: {
            getReception() {
                let params = {
                    patientId: localStorage.pid,
                    type: 2
                };
                let url = getUrl() + this.url.getReception;
                getAction(url, params).then((res) => {
                    if (res.data.success) {
                        this.ReceptionImg = res.data.result
                    }
                })
            },

            onClickLeft() {
                window.location.href = './notVisitRecord.html'
            },
            onClickRight() {
                window.location.href = '../index.html?userid=' + localStorage.pid
            },
        },

        created() {
        		if(url('?userid')){
        			this.pid = url('?userid')
        		}else{
        			this.pid = localStorage.pid
        		}
        		if(url('?from')){
        			this.from = url('?from')
        		}
            this.getReception()
        },
    });
    app.use(vant);
    app.use(vant.Lazyload);
    app.use(VueViewer.default);
    app.mount('#app');
</script>

</html>